<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>选择差旅政策</title>
    <!--<link rel="stylesheet" href="../../../css/font/iconfont.css"/>-->
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_416949_01rxlx171vqb0529.css" />
    <link rel="stylesheet" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../css/index/train/select_travel_policy.css" />
</head>

<body style="cursor: pointer">
    <!--头部start-->
    <header class="aui-bar aui-bar-nav" style="background: #3CB0D6;" id='header'>
        <a class="aui-pull-left aui-btn" onclick="closeWin();">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">选择差旅政策</div>
        <a class="aui-pull-right aui-margin-r-10 aui-text-warning refresh">
            <i class="aui-iconfont aui-icon-refresh"></i>
        </a>
    </header>
    <!--头部end-->
</body>
<script type="text/javascript" src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script src="../../../script/aui/api.js"></script>
<script src="../../../script/aui/aui-toast.js"></script>
<script src="../../../script/config.js"></script>
<script src="../../../script/common.js"></script>
<script>
    var planeInfo, plane_msg, selected_staff;
    apiready = function() {
        api.parseTapmode();
        var productId = $api.getStorage('card_submit_type'); //完成返回页面标识 0火车票 1机票 2酒店
        var jsonParam = {};
        switch (Number(productId)) {
            case 0:
                jsonParam.selected_staff    = $api.getStorage('travel_people_id_array'); //[1,2]
                jsonParam.train_type        = api.pageParam.train_type;
                jsonParam.seat_name         = api.pageParam.seat_name;
                //jsonParam.company_staff = api.pageParam.company_staff;
                break;
            case 1:
                jsonParam.selected_staff = api.pageParam.selected_staff;
                jsonParam.plane_msg = api.pageParam.plane_msg;
                jsonParam.planeInfo = api.pageParam.planeInfo;
                break;
            case 2:
                jsonParam.city = api.pageParam.city;
                jsonParam.price = api.pageParam.price;
                break;
            default:
                console.log("default");
                break;
        }
        var header = $api.byId('header');
        $api.fixStatusBar(header);
        var contentHead = api.winHeight - $api.byId('header').offsetHeight;
        api.openFrame({
            name: 'travel_policy_frm',
            url: './travel_policy_frm.html',
            rect: {
                x: 0,
                y: $api.byId('header').offsetHeight,
                w: 'auto',
                h: contentHead
            },
            pageParam: jsonParam,
            bounces: true,
            bgColor: 'rgba(0,0,0,0)',
            vScrollBarEnabled: true,
            hScrollBarEnabled: true
        });
        
        $('.refresh').click(function () {
            console.log($api.getStorage('travel_people_spare'));
            var jsfun = 'get_policy_list("win");';
            api.execScript({
                frameName: 'travel_policy_frm',
                script: jsfun
            });
        });
    }
</script>

</html>
